package com.woniu.outlet.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient("finance-reliable-message")
public interface ReliableMessageServiceClient {

    @PostMapping("/message/send")
    public boolean sendMessage(
            @RequestParam("exchange") String exchange,
            @RequestParam("routing_key") String routingKey,
            @RequestParam("message_content") String messageContent);

    @PostMapping("/message/{id}/received")
    public boolean receivedMessage(@PathVariable("id") Integer messageId);
}
